1. Field of the Invention
The present invention relates in the field of a computer system hard disk drives. More particularly, the present invention relates to an apparatus and method for restricting the generation of a disk Input/Output (I/O) request to prevent a queue overflow.
2. Description of the Related Art
In recent years, products mounting computer systems have quickly changed from a fixed form, such as desktop computers, to a mobile form such as laptop computers. Since the mobile equipments are often used during movement, the mobile equipments are highly possible to experience external impact such as vibration, falling, etc. Thus, technologies for protecting data within the mobile equipments from the external impact are needed. Particularly, among storage media constituting the computer system, the hard disk drive (HDD) is particularly vulnerable to the external impact. Thus, there is a need for a technology for protecting the HDD from the external impact.
As is known in the art, an HDD is an auxiliary memory device for storing and reading data while rotating a disk type aluminum substrate coated with magnetic substance, i.e., a platter. A magnetic head for reading data stored in a magnetic form is installed at a minute distance around the platter. The magnetic head moves left and right. If the magnetic head experiences high impact in any position on the platter, the magnetic head may come into direct contact with the platter and do damage to the platter surface. Thus, the magnetic head cannot physically read and write data onto the platter. Thus, the conventional art provides a technology for preventing damages by sensing the generation of vibration or impact through an accelerometer sensor and, before the impact is forwarded to HDD, moving the magnetic head to a safe zone.
FIG. 1 is a block diagram illustrating an apparatus configuration for protecting HDD in a computer system according to the conventional art.
Referring to FIG. 1, an HDD protection manager 100 receives an acceleration value periodically measured by an accelerometer sensor 104 via a sensor driver 102, and determines if a current system is in a stable status or an unstable status. If it is determined that the current system is in the unstable status, the HDD protection manager 100 requests an HDD filter driver 116 to move a magnetic head to a safe zone. If the system is changed from the unstable status to the stable status, the HDD protection manager 100 requests the HDD filter driver 116 to restore the magnetic head to the original position.
If the HDD filter driver 116 is requested to move the magnetic head to the safe zone, the HDD filter driver 116 sends a physical hard disk driver 124 a signal requesting movement of the magnetic head to the safe zone and allows time for the magnetic head to move to the safe zone. At this time, the HDD filter driver 116 prevents all I/O requests forwarded from an HDD driver 114 from being forwarded to an I/O control driver 122, using an I/O request flow controller 118. Thereby preventing the magnetic head of the physical hard disk driver 124 from going back onto a platter surface and being exposed to danger. That is, the HDD filter driver 116 stores all I/O requests forwarded from the HDD driver 114 in an internal I/O queue 120 so as not to forward the I/O request to the I/O control driver 122 while the unstable status is maintained, thereby protecting the physical hard disk driver 124. On the other hand, if the HDD protection manager 100 requests the HDD filter driver 116 restore the magnetic head to the original position, the HDD filter driver 116 can forward all I/O requests, which have been stored in the internal I/O queue 120, to the physical hard disk driver 124 via the I/O control driver 122, thereby allowing the magnetic head of the physical hard disk driver 124 to move onto the platter surface out of the safe zone and perform physical I/O.
The aforementioned conventional HDD protection technique has no problem in cases where a vibration or impact time is short and, during this time, a limited number disk I/O requests is generated. But, there is a problem that a queue overflow is generated in case where the vibration or impact time is very long or a large number disk I/O requests is generated within a short time and the number exceeds a capacity of the internal I/O queue 120. If the queue overflow is generated, the computer system enters a fatal state such as a hang up, a halt, or a Blue Screen Of Death (BSOD). Also, because a post process is impossible for the disk I/O request exceeding the capacity of the internal I/O queue 120, a user data loss is unavoidable.
To prevent the above problems, a queue may be increased in size, but there is generally a limit to a size of a memory assignable to the queue. Thus, there is a need for a different way to solve the above problems.